package com.yanqingying.Exception;

import com.yanqingying.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionController {
    @ExceptionHandler
    public Result exception(Exception a){
        log.error(a.getMessage());
        log.error("请联系管理员");
        return Result.success();
    }
}
